package cn.bugstack.chatgpt.domain.images;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;

@Data
@Builder
@Slf4j
@JsonInclude(JsonInclude.Include.NON_NULL)
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class ImageRequest implements Serializable {

    /** 默认模型 */
    private String model = Model.COGVIEW_4.getCode();
    /** 所需图像的文本描述 */
    private String prompt;
    /** 图片尺寸 */
    private String size = Size.DEFAULT.getCode();
    /** 调用标识，避免重复调用 */
    private String user;

    @Getter
    @AllArgsConstructor
    public enum Model {
        /* cogview-4 */
        COGVIEW_4("cogview-4"),
        COGVIEW_3_FLASH("cogview-3-flash"),
        ;

        private String code;
    }

    @Getter
    @AllArgsConstructor
    public enum Size {
        /* 1024x1024 */
        DEFAULT("1024x1024"),
        S_768x1344("768x1344"),
        S_864x1152("864x1152"),
        S_1344x768("1344x768"),
        S_1152x864("1152x864"),
        S_1440x720("1440x720"),
        S_720x1440("720x1440"),
        ;

        private String code;
    }
}
